{extend name="layout/base" /}
{block name="header"}
{include file="common/search"}
{/block}
{block name="content"}
{php}
use think\Request;
$request = Request::instance();
$domain = $request->domain();
{/php}
<div class="mb20">
    {volist name="list" id="v"}
    <div class="company-item" style="">

        <img src="http://shang.cloudtimes.top{$v.cover}" alt="" style="width: 6rem;">
        <span style="left: 7rem;">{$v.name}</span>
        <div class="product-info" style="left: 7rem;">
            <p>型号/规格：{$v.version}</p>
            <p>批发价：{if condition="$v.price == 0"}面议{else/}{$v.price}{/if}</p>
            <p>会员价：{if condition="$v.vip_price == 0"}面议{else/}{$v.vip_price}{/if}</p>
            <p>日限购：{$v.day_buy}</p>
        </div>
        <a class="more" href="tel:{$v.phone}" class="red">咨询</a>
    </div>
    {/volist}
    <div class="center">
        {$page}
    </div>
</div>
{/block}
{block name="footer"}
{include file="common/footer" /}
{/block}

{block name="script"}
<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script type="text/javascript">
// 点击预览图片
$('.company-item').on('click','img',function(){
    var src = $(this).attr('src');
    var imgs = $(this).parent().parent().find('img');
    var list = new Array();
    for (var i = 0; i < imgs.length; i++) {
        list.push($(imgs[i]).attr('src'));
    }
    wx.previewImage({
        current: src, // 当前显示图片的http链接
        urls: list // 需要预览的图片http链接列表
    });
});
</script>
{/block}
